#!/bin/bash

#if [ "$EUID" -ne 0 ]; then #普通用户
  
source /etc/profile

if ! dpkg-query -W -f='${Status}' python3-distro 2>/dev/null | grep "install ok installed" > /dev/null; then
    echo "Python3-Distro not installed. Installing now..."
    sudo apt -y update
    sudo apt -y install python3-distro
fi

if ! dpkg-query -W -f='${Status}' python3-yaml 2>/dev/null | grep "install ok installed" > /dev/null; then
    echo "Python3-Yaml not installed. Installing now..."
    sudo apt -y update
    sudo apt -y install python3-yaml
fi

if [ $UID -eq 0 ];then
    apt-get install sudo 
fi

sudo python3 install.py

source ~/.bashrc


#else #root
#    echo " "
#    echo "====检测到使用超级管理员用户运行!!!===="
#    echo "====请切换为普通用户再运行本脚本!!!===="
#    echo " "
#fi
